package net.wanji.redistooracle.controller;

import net.wanji.redistooracle.service.DataMigrationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author weixiaochun
 */
@RestController
public class DataMigrationController {

    @Resource
    private DataMigrationService dataMigrationService;

    @GetMapping("/redisToOracle")
    public String redisToOracle(@RequestParam(value = "/prefix", required = false)String prefix,
                                @RequestParam(value = "/suffix", required = false)String suffix){
        dataMigrationService.redisToOracle(prefix, suffix);
        return "success";
    }
}
